
import org.sugar.utilities.BTree;

import flash.display.MovieClip;
import flash.display.Stage;

class TreeDemo {
	public static function main(){
		var x = new MovieClip(); x.name = 'x'; x.x = 10; x.y = 10;
		var y = new MovieClip(); y.name = 'y'; y.x = 30; y.y = 10;
		var z = new MovieClip(); z.name = 'z'; z.x = 15; z.y = 30;
		var z2 = new MovieClip(); z2.name = 'z2'; z2.x = 19; z2.y = 30;
		
/*		var h = new FastCell<Int>();*/
		var f = function(x:MovieClip):Float{return x.x;}
/*		var t:BTree<MovieClip> = new BTree([x,y,z,x,z,z2],f);*/
		var t:BTree<MovieClip> = new BTree([x,y,z,z,x,y,z2,x],f,4);
		trace(t);
	}
}